#ifndef __triac_h
#define __triac_h

//Hal------------------
#define F_setJDQ()  P3_3=1
#define F_clrJDQ()  P3_3=0	

#define	F_setYX()	P3_1=1
#define F_clrYX()	P3_1=0

#define F_setFZJR() P3_2=1 
#define F_clrFZJR()	P3_2=0 
//Const-----------------


#define D_0W 0
#define D_100W 1
#define D_200W 3
#define D_300W 5
#define D_400W 4
#define D_500W 10
#define D_600W 6
#define D_700W 7
#define D_800W 20
// //Var-----------------
	#ifdef __triac_c
	bit bWattSetted;
	uint8_t fireType;
	uint8_t fireTypeNum;
	uint8_t  YXHoldNum;
	bit bYX;
	bit bAllowYX;
	uint8_t holdFireType;
	uint8_t maxFireTypeNum;
	#else
	extern uint8_t maxFireTypeNum;
	extern uint8_t holdFireType;
	extern	bit bAllowYX;
	extern bit bYX;
	extern	uint8_t  YXHoldNum;
	extern	uint8_t fireTypeNum;
	extern bit bWattSetted;
	extern uint8_t fireType;
	#endif
//Function-------------------
void InitTriac() ;
void	JDQ();
void	 YX();
#endif
